<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-CPP: TCanvas类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-CPP
   </div>
   <div id="projectbrief">AWTK CPP API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="class_t_canvas-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">TCanvas类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a6b78e10d87c7538a86a55e9b3cb7156d"><td class="memItemLeft" align="right" valign="top"><a id="a6b78e10d87c7538a86a55e9b3cb7156d"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TCanvas</b> (canvas_t *nativeObj)</td></tr>
<tr class="separator:a6b78e10d87c7538a86a55e9b3cb7156d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61731fce140417e38bf48bdce5966f3f"><td class="memItemLeft" align="right" valign="top"><a id="a61731fce140417e38bf48bdce5966f3f"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TCanvas</b> (const canvas_t *nativeObj)</td></tr>
<tr class="separator:a61731fce140417e38bf48bdce5966f3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49d6147a13d0aaae3dafe2a075c70353"><td class="memItemLeft" align="right" valign="top">wh_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a49d6147a13d0aaae3dafe2a075c70353">GetWidth</a> ()</td></tr>
<tr class="separator:a49d6147a13d0aaae3dafe2a075c70353"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9bcac84192d476d7730812658452dfe9"><td class="memItemLeft" align="right" valign="top">wh_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a9bcac84192d476d7730812658452dfe9">GetHeight</a> ()</td></tr>
<tr class="separator:a9bcac84192d476d7730812658452dfe9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae035f128750a4da5f0eb716e1c8c05a2"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#ae035f128750a4da5f0eb716e1c8c05a2">GetClipRect</a> (<a class="el" href="class_t_rect.html">TRect</a> &amp;r)</td></tr>
<tr class="separator:ae035f128750a4da5f0eb716e1c8c05a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6638960a3a3eaec58dd5c7050915bed1"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a6638960a3a3eaec58dd5c7050915bed1">SetClipRect</a> (<a class="el" href="class_t_rect.html">TRect</a> &amp;r)</td></tr>
<tr class="separator:a6638960a3a3eaec58dd5c7050915bed1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae109202de6aa23ecc830bd58a4aaf829"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#ae109202de6aa23ecc830bd58a4aaf829">SetClipRectEx</a> (<a class="el" href="class_t_rect.html">TRect</a> &amp;r, bool translate)</td></tr>
<tr class="separator:ae109202de6aa23ecc830bd58a4aaf829"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6467434fcd431d510932ef1856a5a881"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a6467434fcd431d510932ef1856a5a881">SetFillColor</a> (const char *color)</td></tr>
<tr class="separator:a6467434fcd431d510932ef1856a5a881"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0bce926cd13e34a267086f9d46659fa6"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a0bce926cd13e34a267086f9d46659fa6">SetTextColor</a> (const char *color)</td></tr>
<tr class="separator:a0bce926cd13e34a267086f9d46659fa6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a88bd2b5b5a58b04da04098df6242df"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a0a88bd2b5b5a58b04da04098df6242df">SetStrokeColor</a> (const char *color)</td></tr>
<tr class="separator:a0a88bd2b5b5a58b04da04098df6242df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3746597bb4db7d1de86fe1432d91bd8c"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a3746597bb4db7d1de86fe1432d91bd8c">SetGlobalAlpha</a> (uint8_t alpha)</td></tr>
<tr class="separator:a3746597bb4db7d1de86fe1432d91bd8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7bd6f2dd624811beae2922558bd78ac1"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a7bd6f2dd624811beae2922558bd78ac1">Translate</a> (xy_t dx, xy_t dy)</td></tr>
<tr class="separator:a7bd6f2dd624811beae2922558bd78ac1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1db2e0f6fedfe9fb74ba39689e31c3b3"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a1db2e0f6fedfe9fb74ba39689e31c3b3">Untranslate</a> (xy_t dx, xy_t dy)</td></tr>
<tr class="separator:a1db2e0f6fedfe9fb74ba39689e31c3b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5fae36d2679bf87b0fd671a598e5d91"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#aa5fae36d2679bf87b0fd671a598e5d91">DrawVline</a> (xy_t x, xy_t y, wh_t h)</td></tr>
<tr class="separator:aa5fae36d2679bf87b0fd671a598e5d91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa124bbf9a4a8a5876c1c2620e64b50a2"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#aa124bbf9a4a8a5876c1c2620e64b50a2">DrawHline</a> (xy_t x, xy_t y, wh_t w)</td></tr>
<tr class="separator:aa124bbf9a4a8a5876c1c2620e64b50a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a470b0fecb53c44d66a879e1c0331de4e"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a470b0fecb53c44d66a879e1c0331de4e">FillRect</a> (xy_t x, xy_t y, wh_t w, wh_t h)</td></tr>
<tr class="separator:a470b0fecb53c44d66a879e1c0331de4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa54afb4b3cd60513b1206547b7b02ac0"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#aa54afb4b3cd60513b1206547b7b02ac0">StrokeRect</a> (xy_t x, xy_t y, wh_t w, wh_t h)</td></tr>
<tr class="separator:aa54afb4b3cd60513b1206547b7b02ac0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8570ee592258ea0bba13179e34ef5138"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a8570ee592258ea0bba13179e34ef5138">SetFont</a> (const char *name, font_size_t size)</td></tr>
<tr class="separator:a8570ee592258ea0bba13179e34ef5138"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a3fef1fd0afd0447cea625fa940e2e7"><td class="memItemLeft" align="right" valign="top">float_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a4a3fef1fd0afd0447cea625fa940e2e7">MeasureText</a> (const char *str)</td></tr>
<tr class="separator:a4a3fef1fd0afd0447cea625fa940e2e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99c8972eb7b4f26feabebd9cc549bbcf"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a99c8972eb7b4f26feabebd9cc549bbcf">DrawText</a> (const char *str, xy_t x, xy_t y)</td></tr>
<tr class="separator:a99c8972eb7b4f26feabebd9cc549bbcf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d62c5abfbb87ca8ce4b0563497dbceb"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a6d62c5abfbb87ca8ce4b0563497dbceb">DrawTextInRect</a> (const char *str, <a class="el" href="class_t_rect.html">TRect</a> &amp;r)</td></tr>
<tr class="separator:a6d62c5abfbb87ca8ce4b0563497dbceb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bd5102b11bb5bc3a1e96f8a61229894"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a5bd5102b11bb5bc3a1e96f8a61229894">DrawIcon</a> (<a class="el" href="class_t_bitmap.html">TBitmap</a> &amp;img, xy_t cx, xy_t cy)</td></tr>
<tr class="separator:a5bd5102b11bb5bc3a1e96f8a61229894"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39191ff063b921405d4d2bf243b5b1e1"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a39191ff063b921405d4d2bf243b5b1e1">DrawImage</a> (<a class="el" href="class_t_bitmap.html">TBitmap</a> &amp;img, <a class="el" href="class_t_rect.html">TRect</a> &amp;src, <a class="el" href="class_t_rect.html">TRect</a> &amp;dst)</td></tr>
<tr class="separator:a39191ff063b921405d4d2bf243b5b1e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae991b51e189ef9c16013c2050fa48078"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#ae991b51e189ef9c16013c2050fa48078">DrawImageEx</a> (<a class="el" href="class_t_bitmap.html">TBitmap</a> &amp;img, image_draw_type_t draw_type, <a class="el" href="class_t_rect.html">TRect</a> &amp;dst)</td></tr>
<tr class="separator:ae991b51e189ef9c16013c2050fa48078"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66209c77d4fc2703efa98d0507c30497"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_t_vgcanvas.html">TVgcanvas</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a66209c77d4fc2703efa98d0507c30497">GetVgcanvas</a> ()</td></tr>
<tr class="separator:a66209c77d4fc2703efa98d0507c30497"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a319fccdc99e75b5bbafedcecb799689e"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a319fccdc99e75b5bbafedcecb799689e">Reset</a> ()</td></tr>
<tr class="separator:a319fccdc99e75b5bbafedcecb799689e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a310f49108a9dd00ff3ee4fadf28784d4"><td class="memItemLeft" align="right" valign="top">xy_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a310f49108a9dd00ff3ee4fadf28784d4">GetOx</a> () const</td></tr>
<tr class="separator:a310f49108a9dd00ff3ee4fadf28784d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7606c5f012f3d917d691ab91f7302b98"><td class="memItemLeft" align="right" valign="top">xy_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a7606c5f012f3d917d691ab91f7302b98">GetOy</a> () const</td></tr>
<tr class="separator:a7606c5f012f3d917d691ab91f7302b98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7cf32703d4364e2785c01e2ae8431727"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#a7cf32703d4364e2785c01e2ae8431727">GetFontName</a> () const</td></tr>
<tr class="separator:a7cf32703d4364e2785c01e2ae8431727"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4982c3daeb7ebf8de8cb8023722267f"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#aa4982c3daeb7ebf8de8cb8023722267f">GetFontSize</a> () const</td></tr>
<tr class="separator:aa4982c3daeb7ebf8de8cb8023722267f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad69d5880442435f126f2435eecd9234c"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_canvas.html#ad69d5880442435f126f2435eecd9234c">GetGlobalAlpha</a> () const</td></tr>
<tr class="separator:ad69d5880442435f126f2435eecd9234c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a1b6efe083f68134105009fe230f2f5c5"><td class="memItemLeft" align="right" valign="top"><a id="a1b6efe083f68134105009fe230f2f5c5"></a>
static <a class="el" href="class_t_canvas.html">TCanvas</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (canvas_t *nativeObj)</td></tr>
<tr class="separator:a1b6efe083f68134105009fe230f2f5c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a608e732f6f3e96768bd6a83ab26a8619"><td class="memItemLeft" align="right" valign="top"><a id="a608e732f6f3e96768bd6a83ab26a8619"></a>
static <a class="el" href="class_t_canvas.html">TCanvas</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const canvas_t *nativeObj)</td></tr>
<tr class="separator:a608e732f6f3e96768bd6a83ab26a8619"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:a02fe74924e1d36a071523081a3392550"><td class="memItemLeft" align="right" valign="top"><a id="a02fe74924e1d36a071523081a3392550"></a>
canvas_t *&#160;</td><td class="memItemRight" valign="bottom"><b>nativeObj</b></td></tr>
<tr class="separator:a02fe74924e1d36a071523081a3392550"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>提供基本的绘图功能和状态管理。 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="aa124bbf9a4a8a5876c1c2620e64b50a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa124bbf9a4a8a5876c1c2620e64b50a2">&#9670;&nbsp;</a></span>DrawHline()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::DrawHline </td>
          <td>(</td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>w</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>画水平线。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>x坐标。 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标。 </td></tr>
    <tr><td class="paramname">w</td><td>宽度。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a5bd5102b11bb5bc3a1e96f8a61229894"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5bd5102b11bb5bc3a1e96f8a61229894">&#9670;&nbsp;</a></span>DrawIcon()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::DrawIcon </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_t_bitmap.html">TBitmap</a> &amp;&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>cx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>cy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>绘制图标。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>图片对象。 </td></tr>
    <tr><td class="paramname">cx</td><td>中心点x坐标。 </td></tr>
    <tr><td class="paramname">cy</td><td>中心点y坐标。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a39191ff063b921405d4d2bf243b5b1e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a39191ff063b921405d4d2bf243b5b1e1">&#9670;&nbsp;</a></span>DrawImage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::DrawImage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_t_bitmap.html">TBitmap</a> &amp;&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_t_rect.html">TRect</a> &amp;&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_t_rect.html">TRect</a> &amp;&#160;</td>
          <td class="paramname"><em>dst</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>绘制图片。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>图片对象。 </td></tr>
    <tr><td class="paramname">src</td><td>源区域。 </td></tr>
    <tr><td class="paramname">dst</td><td>目的区域。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ae991b51e189ef9c16013c2050fa48078"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae991b51e189ef9c16013c2050fa48078">&#9670;&nbsp;</a></span>DrawImageEx()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::DrawImageEx </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_t_bitmap.html">TBitmap</a> &amp;&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">image_draw_type_t&#160;</td>
          <td class="paramname"><em>draw_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_t_rect.html">TRect</a> &amp;&#160;</td>
          <td class="paramname"><em>dst</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>绘制图片。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>图片对象。 </td></tr>
    <tr><td class="paramname">draw_type</td><td>绘制类型。 </td></tr>
    <tr><td class="paramname">dst</td><td>目的区域。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a99c8972eb7b4f26feabebd9cc549bbcf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a99c8972eb7b4f26feabebd9cc549bbcf">&#9670;&nbsp;</a></span>DrawText()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::DrawText </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>绘制文本。</p>
<blockquote class="doxtable">
<p>供脚本语言使用。 </p>
</blockquote>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>字符串。 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标。 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a6d62c5abfbb87ca8ce4b0563497dbceb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6d62c5abfbb87ca8ce4b0563497dbceb">&#9670;&nbsp;</a></span>DrawTextInRect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::DrawTextInRect </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_t_rect.html">TRect</a> &amp;&#160;</td>
          <td class="paramname"><em>r</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>绘制文本。</p>
<blockquote class="doxtable">
<p>供脚本语言使用。 </p>
</blockquote>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>字符串。 </td></tr>
    <tr><td class="paramname">r</td><td>矩形区域。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="aa5fae36d2679bf87b0fd671a598e5d91"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa5fae36d2679bf87b0fd671a598e5d91">&#9670;&nbsp;</a></span>DrawVline()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::DrawVline </td>
          <td>(</td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>画垂直线。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>x坐标。 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标。 </td></tr>
    <tr><td class="paramname">h</td><td>高度。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a470b0fecb53c44d66a879e1c0331de4e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a470b0fecb53c44d66a879e1c0331de4e">&#9670;&nbsp;</a></span>FillRect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::FillRect </td>
          <td>(</td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>填充矩形。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>x坐标。 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标。 </td></tr>
    <tr><td class="paramname">w</td><td>宽度。 </td></tr>
    <tr><td class="paramname">h</td><td>高度。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ae035f128750a4da5f0eb716e1c8c05a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae035f128750a4da5f0eb716e1c8c05a2">&#9670;&nbsp;</a></span>GetClipRect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::GetClipRect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_t_rect.html">TRect</a> &amp;&#160;</td>
          <td class="paramname"><em>r</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>获取裁剪区。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">r</td><td>rect对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a7cf32703d4364e2785c01e2ae8431727"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7cf32703d4364e2785c01e2ae8431727">&#9670;&nbsp;</a></span>GetFontName()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char * TCanvas::GetFontName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>当前字体名称。 </p>

</div>
</div>
<a id="aa4982c3daeb7ebf8de8cb8023722267f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa4982c3daeb7ebf8de8cb8023722267f">&#9670;&nbsp;</a></span>GetFontSize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t TCanvas::GetFontSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>当前字体大小。 </p>

</div>
</div>
<a id="ad69d5880442435f126f2435eecd9234c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad69d5880442435f126f2435eecd9234c">&#9670;&nbsp;</a></span>GetGlobalAlpha()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t TCanvas::GetGlobalAlpha </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>当前全局alpha。 </p>

</div>
</div>
<a id="a9bcac84192d476d7730812658452dfe9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9bcac84192d476d7730812658452dfe9">&#9670;&nbsp;</a></span>GetHeight()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wh_t TCanvas::GetHeight </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>获取画布的高度。</p>
<dl class="section return"><dt>返回</dt><dd>返回画布的高度。 </dd></dl>

</div>
</div>
<a id="a310f49108a9dd00ff3ee4fadf28784d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a310f49108a9dd00ff3ee4fadf28784d4">&#9670;&nbsp;</a></span>GetOx()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">xy_t TCanvas::GetOx </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>x坐标偏移。 </p>

</div>
</div>
<a id="a7606c5f012f3d917d691ab91f7302b98"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7606c5f012f3d917d691ab91f7302b98">&#9670;&nbsp;</a></span>GetOy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">xy_t TCanvas::GetOy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>y坐标偏移。 </p>

</div>
</div>
<a id="a66209c77d4fc2703efa98d0507c30497"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a66209c77d4fc2703efa98d0507c30497">&#9670;&nbsp;</a></span>GetVgcanvas()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_t_vgcanvas.html">TVgcanvas</a> TCanvas::GetVgcanvas </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>获取vgcanvas对象。</p>
<dl class="section return"><dt>返回</dt><dd>返回vgcanvas对象。 </dd></dl>

</div>
</div>
<a id="a49d6147a13d0aaae3dafe2a075c70353"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49d6147a13d0aaae3dafe2a075c70353">&#9670;&nbsp;</a></span>GetWidth()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wh_t TCanvas::GetWidth </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>获取画布的宽度。</p>
<dl class="section return"><dt>返回</dt><dd>返回画布的宽度。 </dd></dl>

</div>
</div>
<a id="a4a3fef1fd0afd0447cea625fa940e2e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a3fef1fd0afd0447cea625fa940e2e7">&#9670;&nbsp;</a></span>MeasureText()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float_t TCanvas::MeasureText </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>计算文本所占的宽度。</p>
<blockquote class="doxtable">
<p>供脚本语言使用。 </p>
</blockquote>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>字符串。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回文本所占的宽度。 </dd></dl>

</div>
</div>
<a id="a319fccdc99e75b5bbafedcecb799689e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a319fccdc99e75b5bbafedcecb799689e">&#9670;&nbsp;</a></span>Reset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::Reset </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>释放相关资源。</p>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a6638960a3a3eaec58dd5c7050915bed1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6638960a3a3eaec58dd5c7050915bed1">&#9670;&nbsp;</a></span>SetClipRect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::SetClipRect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_t_rect.html">TRect</a> &amp;&#160;</td>
          <td class="paramname"><em>r</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置裁剪区。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">r</td><td>rect对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ae109202de6aa23ecc830bd58a4aaf829"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae109202de6aa23ecc830bd58a4aaf829">&#9670;&nbsp;</a></span>SetClipRectEx()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::SetClipRectEx </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_t_rect.html">TRect</a> &amp;&#160;</td>
          <td class="paramname"><em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>translate</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置裁剪区。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">r</td><td>rect对象。 </td></tr>
    <tr><td class="paramname">translate</td><td>是否将裁剪区的位置加上canvas当前的偏移。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a6467434fcd431d510932ef1856a5a881"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6467434fcd431d510932ef1856a5a881">&#9670;&nbsp;</a></span>SetFillColor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::SetFillColor </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置填充颜色。</p>
<blockquote class="doxtable">
<p>供脚本语言使用。 </p>
</blockquote>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>颜色。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a8570ee592258ea0bba13179e34ef5138"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8570ee592258ea0bba13179e34ef5138">&#9670;&nbsp;</a></span>SetFont()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::SetFont </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">font_size_t&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置字体。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>字体名称。 </td></tr>
    <tr><td class="paramname">size</td><td>字体大小。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a3746597bb4db7d1de86fe1432d91bd8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3746597bb4db7d1de86fe1432d91bd8c">&#9670;&nbsp;</a></span>SetGlobalAlpha()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::SetGlobalAlpha </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>alpha</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置全局alpha值。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">alpha</td><td>alpha值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a0a88bd2b5b5a58b04da04098df6242df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0a88bd2b5b5a58b04da04098df6242df">&#9670;&nbsp;</a></span>SetStrokeColor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::SetStrokeColor </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置线条颜色。</p>
<blockquote class="doxtable">
<p>供脚本语言使用。 </p>
</blockquote>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>颜色。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a0bce926cd13e34a267086f9d46659fa6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0bce926cd13e34a267086f9d46659fa6">&#9670;&nbsp;</a></span>SetTextColor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::SetTextColor </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置文本颜色。</p>
<blockquote class="doxtable">
<p>供脚本语言使用。 </p>
</blockquote>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>颜色。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="aa54afb4b3cd60513b1206547b7b02ac0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa54afb4b3cd60513b1206547b7b02ac0">&#9670;&nbsp;</a></span>StrokeRect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::StrokeRect </td>
          <td>(</td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>绘制矩形。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>x坐标。 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标。 </td></tr>
    <tr><td class="paramname">w</td><td>宽度。 </td></tr>
    <tr><td class="paramname">h</td><td>高度。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a7bd6f2dd624811beae2922558bd78ac1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7bd6f2dd624811beae2922558bd78ac1">&#9670;&nbsp;</a></span>Translate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::Translate </td>
          <td>(</td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>dx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>dy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>平移原点坐标。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">dx</td><td>x偏移。 </td></tr>
    <tr><td class="paramname">dy</td><td>y偏移。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a1db2e0f6fedfe9fb74ba39689e31c3b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1db2e0f6fedfe9fb74ba39689e31c3b3">&#9670;&nbsp;</a></span>Untranslate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TCanvas::Untranslate </td>
          <td>(</td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>dx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>dy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>反向平移原点坐标。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">dx</td><td>x偏移。 </td></tr>
    <tr><td class="paramname">dy</td><td>y偏移。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a></li>
<li>output/awtk_cpp.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
